/* admin..runscriptonallservers '\\cs234-02\c$\work\admin\enableDC-BACKUPP101backups.sql','msdb','x' */ set nocount on if exists (select 1 from msdb.dbo.sysjobs where name like '%backup%' and enabled = 1) begin print 'if @@servername = ''' + @@servername +'''' print space(2) + 'begin' select space(4) + 'exec sp_update_job @job_name = ''' + cast(name as varchar(50)) + ''', @enabled = 0' from msdb.dbo.sysjobs where name like '%backup%' and enabled = 1 print space(2) + 'end' end